package com.ruoyi.basedata.controller;

import com.ruoyi.basedata.domain.BdMaterial;
import com.ruoyi.basedata.service.impl.BdMaterialServiceImpl;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import com.ruoyi.common.core.controller.BaseController;
import java.util.List;

import static com.ruoyi.common.utils.PageUtils.startPage;

@RestController
@RequestMapping("/settlementCenter/basedata/basedatautil")
public class BaseDataUtilController extends BaseController{
    @Autowired
    private BdMaterialServiceImpl materialService;


    @GetMapping("/selectMaterialPage")
    public ModelAndView selectMaterialPage()
    {
        return new ModelAndView("/settlementCenter/basedata/basedataViewmaterialView");
    }

    @GetMapping("/selectMaterialPage/list")
    public TableDataInfo list(BdMaterial bdMaterial)
    {
        startPage();
        List<BdMaterial> list = materialService.selectBdMaterialList(bdMaterial);
        return getDataTable(list);

    }
}
